There are compression encoding schemes that introduces some distortion of audio signal data (sample values) such as MP3, AAC, and TwinVQ. There are also compression encoding schemes of video information data (sample values), such as JPEG There are lossless coding schemes as well that do not introduce distortion (for example see Non-patent literature 1). Also important is lossless compression of floating-point-format data, which is readily editable (for example see Non-patent literature 2). Also known is the Euclidean algorithm, which determines the greatest common divisor, namely common multiplier, of multiple values.
In case of an audio signal, an audio signal captured by a microphone is sampled at a sampling frequency f and using a quantizing bit number q. Each sample value is converted to a digital value, and inputted as digital sample. The analog samples are often multiplied by a common constant to adjust the gain. If samples are multiplied by a constant in an analog domain before analog-digital conversion is performed, the samples in the analog signal domain can contain errors.
Similarly, in the case of compression encoding of a video information signal, when a two-dimensional video signal is raster-scanned to obtain one-dimensional sample sequences, each of the samples may be multiplied by a common constant to adjust the gain to obtain the original video signal.
Each sample s0(i) in an original sample sequence is multiplied by a common real number G as a gain to obtain a sample s1(i)=s0(i)×G.
The samples s1(i) obtained by multiplying the real number G are often represented in binary notation or IEEE 754 binary floating point format and the digital sample sequences are encoded. The floating point for at standardized as IEEE-754 uses 32 bits as shown in FIG. 1. The floating-point representation consists of a 1-bit sign, an 8-bit exponent, and 23-bit mantissa, starting from the most significant bit. Let S denote the sign, E denote a decimal value represented by the 8-bit exponent, and M denote a binary number of the mantissa Then the numeric value of the floating-point representation can be represented in sign and magnitude binary notation as Formula (1):(−1)S×1.M×2E−E0  (1) [Formula 1]
According to IEEE-754, E0=27−1=127. Therefore, E−E0 in Formula (1) can take any value in the range:−127≦E−E0≦128However, E−E0=127 is defined to be all 0s and E−E0=128 is defined to be all 1s. E−E0=n represents the number of digits (bits) of the integer part of the value expressed by Formula (1) minus 1, that is, the number of bits lower than the highest, “1”.
Most of conventional compression encoding schemes such as the one described in Non-patent literature 1 have tried to minimize redundancy in an original input waveform (for example music signal waveform) of input sample sequences in order to reduce the amount of information. The amplitude (bit length) of an input waveform that can be encoded by an encoder is specified as 16 bits, for example. If the bit length is 24 bits, 16 higher-order bits are encoded and the lower 8 bits are outputted without being encoded or after being separately compression-coded.
Non-patent literature 1 Hans M. and Schafer R. W.: Lossless Compression of Digital Audio, IEEE Signal Processing Magazine, Vol. 18, No. 4, pp. 21-32 (2001).
Non-patent literature 2: Dai Yang and Takehiro Moriya: Lossless Compression for Audio Data in the IEEE Floating-Point Format, AES Convention Paper 59873 AES 115th Convention, New York, N.Y., USA, Oct. 10-13, 2003.